import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
    state: () => ({ name: '访客', isLogin: false }),
    actions: {
        login(username) {
            this.name = username;
            this.isLogin = true;
        }
    }
});
